<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href="<%=application.getContextPath() %>/css/css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=application.getContextPath() %>/js/jquery-1.6.min.js"></script>	
<script language="javascript" src="<%=application.getContextPath() %>/js/calendar_eu.js"></script>
<script type="text/javascript" src="<%=application.getContextPath() %>/js/jquery-ui-1.8.17.custom.min.js"></script>	
<link rel="stylesheet" href="<%=application.getContextPath() %>/css/jquery-ui-1.8.17.custom.css"/>
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery.validate.js"></script>	
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery.validate.min.js"></script>
<style>
	.logout{
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	height: 15px;
	width: 50px;
	font-weight: normal;
	color: red;
	text-decoration: none;
	}
	
	</style>
	
<style>
  	#field, label { float: left; font-family: Arial, Helvetica, sans-serif; font-size: 11px; }
  	label {  width: 14em; }
	br { clear: both; }
	input.error { border: 1px solid red;  }
	label.error {
		padding-left: 16px;
		margin-left: .3em;
		color: red;	
	}	
	.button-black-right{
		margin-right: 5px;
	}
	.textfield{
		width: 190px;
	}
	.textarea1{
		width: 190px;
		
	}
</style>

</head>
<script>
  $(document).ready(function(){
    $("#myform").validate({
  messages: {
	  adpName:
      {
          required: "ADP Name must not be empty.",
      },
	  accName:
      {
          required: "Account Name must not be empty.",
      }
      
   
  }
});
  });
  </script>
<script>
	$(document).ready(function(){
	$('#accName').live('focusin',function(){
	var orlist=$("#orglist").val();
	
	var temp=orlist.split("/");
	//alert(temp);
		$("#accName").autocomplete({
			source: temp
		});
		jQuery('.ui-autocomplete').css({'font-size':'10px','font-family':'Arial','max-height': '100px',
	'overflow-y': 'auto', 'padding-right': '20px', 'overflow-x': 'hidden'});
	
	});
	});
	
</script>
<script type="text/javascript">
function getAdp(){
	var accName=$("#accName").val();
	var data="accName="+accName;
	$.ajax({
		url:"<%=application.getContextPath() %>/adp/getAdp.do",
		mimetype:"text/plain",
		method: "post",
		cache: false,
		data: data,
		success: function(res){
			if(res!=""){
				var temp=res.split("/");
				$("#adpName").val(temp[0]);
				$("#owner").val(temp[1]);
				$("#orgType").val(temp[2]);
				$("#industryType").val(temp[3]);
				$("#activity").val(temp[4]);
				$("#reviewPerid").val(temp[5]);
				$("#visitFreq").val(temp[6]);
				$("#contFreq").val(temp[7]);
				$("#designSpent").val(temp[8]);
				$("#prodSpent").val(temp[9]);
				$("#electrComp").val(temp[10]);
				$("#cables").val(temp[11]);
				$("#connectors").val(temp[12]);
				$("#devTools").val(temp[13]);
				$("#MROProd").val(temp[14]);
				$("#fabrication").val(temp[15]);
				$("#testCalbr").val(temp[16]);
				$("#testEquip").val(temp[17]);
				$("#others").val(temp[18]);
				$("#custEndProd").val(temp[19]);
				$("#comptInfo").val(temp[20]);
			
				
			}
				else {
					$("#adpName").val("");
					$("#owner").val("");
					$("#orgType").val("");
					$("#industryType").val("");
					$("#activity").val("");
					$("#reviewPerid").val("");
					$("#visitFreq").val("");
					$("#contFreq").val("");
					$("#designSpent").val("");
					$("#prodSpent").val("");
					$("#electrComp").val("");
					$("#cables").val("");
					$("#connectors").val("");
					$("#devTools").val("");
					$("#MROProd").val("");
					$("#fabrication").val("");
					$("#testCalbr").val("");
					$("#testEquip").val("");
					$("#others").val("");
					$("#custEndProd").val("");
					$("#comptInfo").val("");
				}
		}
	});
}
</script>
<body>
<form action="<%=application.getContextPath() %>/adp/save.do" method="post"  name="myform" id="myform">
<table width="927" style="height: 700px" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td height="116" align="left" valign="top" background="<%=application.getContextPath() %>/images/top-bg.jpg" style="background-repeat:repeat-x; background-position:left top">
    <%@ include file="common/exe-header.jsp" %>
    </td>
  </tr>
  <tr>
    <td align="left" valign="top">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    	<tr>
    		<td width="5%" align="left" valign="top">&nbsp;&nbsp;
    			<a href="<%=application.getContextPath() %>/user/open.do"><img src="<%=application.getContextPath() %>/images/home1.jpg" width="20" height="20" border="0" /></a>
    		</td>
    	<td align="center" valign="top">
    	<%
        if(request.getParameter("success")!=null){
        	out.println(request.getParameter("success"));
        }
        %>
    	</td>
    	 <td width="8%" align="center"><a href="<%=application.getContextPath() %>/user/logout.do" style="font-family: sans-serif;">&nbsp;&nbsp;Logout</a></td>
    	</tr>
    	
    </table>
    </td>
  </tr>
  <tr>
    <td height="640" align="left" valign="top">
    <table width="98%" align="center" height="298" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="100%" align="center" valign="top">
        <table width="100%" height="625" cellpadding="0" cellspacing="0" class="box-border1">
          <tr>
            
            <td width="99%" align="left" valign="top">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="20"  align="center" valign="middle" style="background:url(<%=application.getContextPath() %>/images/hed-bg-block.jpg); background-repeat:repeat-x" class="hed2"><strong>Account Development Plan</strong></td>
              </tr>
              <tr>
                <td height="20" align="center"  class="icon-header2"></td>
              </tr>
              <tr>
                <td height="20"  align="left"  class="icon-header2">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
              		<tr>
                <td height="18" colspan="3"  align="left" valign="middle"  class="hed2" style="background:url(<%=application.getContextPath() %>/images/arrow-big.jpg); background-repeat:no-repeat">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Information</td>
               
               
              </tr>
              <tr>
              	<td>
                	<table width="100%" border="0" cellspacing="0" cellpadding="0">
                   
                <tr>
                <td height="10" align="right" bgcolor="#ffffff" class="hed-blc"></td>
                <td></td>
                <td ></td>
                <td ></td>
                <td width="19%"></td>
                <td width="1%"></td>
                <td width="34%"></td>
                </tr>
              
              <tr>
                <td height="10" align="right" bgcolor="#ffffff" class="hed-blc"></td>
                <td></td>
                <td ></td>
                <td ></td>
                <td width="19%"></td>
                <td width="1%"></td>
                <td width="34%"></td>
                </tr>
                <tr>
                <td height="21" align="right" bgcolor="#ffffff"  class="hed-blc">Company Name:</td>
                <td>&nbsp;</td>
                <td><input name="accName" type="text" class="textfield required" id="accName" tabindex="1" onBlur="javascript: getAdp()" /></td>
                <td>&nbsp;</td>
                <td height="21" align="right" bgcolor="#ffffff"  class="hed-blc">Organisation Type:</td>
                <td>&nbsp;</td>
                <td><select name="orgType" id="orgType" class="textfield" >
                          <option value="">Please Select</option>
                          <option value="Public Sector Unit">Public Sector Unit(PSU)</option>
                          <option value="Private">Private</option>
                          <option value="Defense">Defense</option>
                          <option value="Educational">Educational</option>
                         
                      </select></td>
              </tr>
              
              <tr>
                <td height="10" align="right" class="hed-blc" ></td>
                <td></td>
                <td ></td>
                <td ></td>
                <td width="19%"></td>
                <td width="1%"></td>
                <td width="34%"></td>
              </tr>
              <tr >
                <td width="20%" height="20" align="right"  class="hed-blc">User Name:</td>
                <td width="1%" >&nbsp;</td>
                <td width="24%" >
                  <input name="adpName" type="text" class="textfield required" id="adpName" tabindex="2" />                                 </td>
                <td width="1%" >&nbsp;</td>
                <td height="21" align="right" bgcolor="#ffffff"  class="hed-blc">Industry Type:</td>
                <td>&nbsp;</td>
                <td><select name="industryType" id="industryType" class="textfield" >
                          <option value="">Please Select</option>
                          <option value="Electrical">Electrical</option>
                          <option value="Electronics">Electronics</option>
                          <option value="Cement">Cement</option>
                          <option value="Railways">Railways</option>
                          <option value="Power">Power</option>
                          <option value="Nuclear">Nuclear</option>
                          <option value="Construction">Construction</option>
                          <option value="Fabrication">Fabrication</option>
                          <option value="Chemical">Chemical</option>
                          <option value="Mechanical">Mechanical</option>
                          <option value="Irrigation">Irrigation</option>
                          <option value="Agriculture">Agriculture</option>
                         
                      </select></td>
              </tr>
              
              <tr>
                <td height="10" align="right" bgcolor="#ffffff" class="hed-blc"></td>
                <td></td>
                <td ></td>
                <td ></td>
                <td width="19%"></td>
                <td width="1%"></td>
                <td width="34%"></td>
              </tr>
              <tr>
                <td height="21" align="right" bgcolor="#ffffff"  class="hed-blc">Team Head Name:</td>
                <td>&nbsp;</td>
                <td><input name="owner" type="text" class="textfield" id="owner" tabindex="3" /></td>
                <td>&nbsp;</td>
                <td height="21" align="right" bgcolor="#ffffff"  class="hed-blc">Activity:</td>
                <td>&nbsp;</td>
                <td><select name="activity" id="activity" class="textfield" >
                          <option value="">Please Select</option>
                          <option value="Research and Development">Research and Development</option>
                          <option value="Design and Development">Design and Development</option>
                          <option value="Proto/Picate Production">Proto/Picate Production</option>
                          <option value="Mass Production">Mass Production</option>
                          <option value="Trading">Trading</option>
                          <option value="Stockiest">Stockiest</option>
                         
                      </select></td>
              </tr>
                    
                    </table>
                </td>
              </tr>
                </table>
                </td>
              </tr>
              <tr>
              	
                <td width="20%" height="10" align="right" bgcolor="#ffffff" class="hed-blc"></td>
                
                
                </tr>
                    
                <tr>
                <td width="20%" height="10" align="right" bgcolor="#ffffff" class="hed-blc"></td>
               
                </tr>
                <tr>
                <td width="20%" height="10" align="right" bgcolor="#ffffff" class="hed-blc"></td>
               
                </tr>
              <tr>
                <td height="20"  align="left"  class="icon-header2">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
              		<tr>
                <td height="18" colspan="3"  align="left" valign="middle"  class="hed2" style="background:url(<%=application.getContextPath() %>/images/arrow-big.jpg); background-repeat:no-repeat">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Plan</td>
               
               
              </tr>
              
                   
                <tr>
                <td width="20%" height="10" align="right" bgcolor="#ffffff" class="hed-blc"></td>
                <td width="1%"></td>
                <td width="24%" ></td>
                <td ></td>
                <td width="19%"></td>
                <td width="1%"></td>
                <td width="34%"></td>
                </tr>
              
              <tr>
                <td height="10" align="right" bgcolor="#ffffff" class="hed-blc"></td>
                <td></td>
                <td ></td>
                <td ></td>
                <td width="19%"></td>
                <td width="1%"></td>
                <td width="34%"></td>
                </tr>
                <tr>
                <td align="right"><span class="hed-blc">Review Period:</span></td>
                <td>&nbsp;</td>
                <td><select name="reviewPerid" class="textfield" id="reviewPerid" tabindex="4">
                  <option>Monthly</option>
                  <option>Quarterly</option>
                  <option>Half Yearly</option>
                  <option>Yearly</option>
                  </select></td>
                <td>&nbsp;</td>
                <td align="right"><span class="hed-blc">Meeting Frequency:</span></td>
                <td>&nbsp;</td>
                <td><select name="visitFreq" class="textfield" id="visitFreq" tabindex="5">
                  <option>Weekly</option>
                  <option>Monthly</option>
                  <option>Half Yearly</option>
                  <option>Yearly</option>
                  </select></td>
              </tr>
              
              <tr>
                <td height="10" align="right" class="hed-blc" ></td>
                <td></td>
                <td ></td>
                <td ></td>
                <td width="19%"></td>
                <td width="1%"></td>
                <td width="34%"></td>
              </tr>
              <tr >
                <td align="right"><span class="hed-blc">Contact Frequency:</span></td>
                <td>&nbsp;</td>
                <td><select name="contFreq" class="textfield" id="contFreq" tabindex="6">
                  <option>Weekly</option>
                  <option>Monthly</option>
                  <option>Half Yearly</option>
                  <option>Yearly</option>
                  </select></td>
                <td width="1%" >&nbsp;</td>
                <td height="21" align="right" bgcolor="#ffffff"  class="hed-blc">&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              
              <tr>
                <td height="10" align="right" bgcolor="#ffffff" class="hed-blc"></td>
                <td></td>
                <td ></td>
                <td ></td>
                <td width="19%"></td>
                <td width="1%"></td>
                <td width="34%"></td>
              </tr>
              
                    
                    </table>
                </td>
              </tr>
                </table>
                </td>
              </tr>
              <tr>
              	<td>
                	<table width="100%" border="0" cellspacing="0" cellpadding="0">
                   
                <tr>
                <td width="20%" height="10" align="right" bgcolor="#ffffff" class="hed-blc"></td>
               
                </tr>
                <tr>
                <td width="20%" height="10" align="right" bgcolor="#ffffff" class="hed-blc"></td>
               
                </tr>
				<tr>
                <td height="20"  align="left"  class="icon-header2">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
              		<tr>
                <td height="18" colspan="3"  align="left" valign="middle"  class="hed2" style="background:url(<%=application.getContextPath() %>/images/arrow-big.jpg); background-repeat:no-repeat">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Customer Spend Profile</td>
               
               
              </tr>
              
                   
               <tr>
                <td width="20%" height="10" align="right" bgcolor="#ffffff" class="hed-blc"></td>
                <td width="1%"></td>
                <td width="24%" ></td>
                <td ></td>
                <td width="19%"></td>
                <td width="1%"></td>
                <td width="34%"></td>
                </tr>
              
              <tr>
                <td height="10" align="right" bgcolor="#ffffff" class="hed-blc"></td>
                <td></td>
                <td ></td>
                <td ></td>
                <td width="19%"></td>
                <td width="1%"></td>
                <td width="34%"></td>
                </tr>
                <tr>
                <td align="right"><span class="hed-blc">Design Spent</span></td>
                <td>&nbsp;</td>
                <td><input name="designSpent" type="text" class="textfield"  id="designSpent" /></td>
                <td ></td>
                 <td align="right" ><span class="hed-blc">Production Spent</span></td>
                <td>&nbsp;</td>
                <td><input name="prodSpent" type="text" class="textfield"  id="prodSpent" /></td>
                
               
              </tr>
              
              <tr>
                <td height="10" align="right" class="hed-blc" ></td>
                <td></td>
                <td ></td>
                <td ></td>
                <td width="19%"></td>
                <td width="1%"></td>
                <td width="34%"></td>
              </tr>
              <tr >
                <td align="right" bgcolor="#ffffff"  class="hed-blc">Electronics Components</td>
                <td>&nbsp;</td>
                <td><input name="electrComp" type="text" class="textfield" id="electrComp" /></td>
                <td width="1%" >&nbsp;</td>
                <td height="21" align="right" bgcolor="#ffffff"  class="hed-blc">Cables</td>
                <td>&nbsp;</td>
                <td><input name="cables" type="text" class="textfield" id="cables" /></td>
              </tr>
               <tr>
                <td height="10" align="right" bgcolor="#ffffff" class="hed-blc"></td>
                <td></td>
                <td ></td>
                <td ></td>
                <td width="19%"></td>
                <td width="1%"></td>
                <td width="34%"></td>
                </tr>
              <tr >
                <td align="right" bgcolor="#ffffff"  class="hed-blc">Connectors</td>
                <td>&nbsp;</td>
                <td><input name="connectors" type="text" class="textfield" id="connectors" /></td>
                <td width="1%" >&nbsp;</td>
                <td height="21" align="right" bgcolor="#ffffff"  class="hed-blc">Development Tools</td>
                <td>&nbsp;</td>
                <td><input name="devTools" type="text" class="textfield" id="devTools" /></td>
              </tr>
               <tr>
                <td height="10" align="right" bgcolor="#ffffff" class="hed-blc"></td>
                <td></td>
                <td ></td>
                <td ></td>
                <td width="19%"></td>
                <td width="1%"></td>
                <td width="34%"></td>
                </tr>
              <tr >
                <td align="right" bgcolor="#ffffff"  class="hed-blc">MRO Products</td>
                <td>&nbsp;</td>
                <td><input name="MROProd" type="text" class="textfield" id="MROProd" /></td>
                <td width="1%" >&nbsp;</td>
                <td height="21" align="right" bgcolor="#ffffff"  class="hed-blc">Fabrication</td>
                <td>&nbsp;</td>
                <td><input name="fabrication" type="text" class="textfield" id="fabrication" /></td>
              </tr>
               <tr>
                <td height="10" align="right" bgcolor="#ffffff" class="hed-blc"></td>
                <td></td>
                <td ></td>
                <td ></td>
                <td width="19%"></td>
                <td width="1%"></td>
                <td width="34%"></td>
                </tr>
              <tr >
                <td align="right" bgcolor="#ffffff"  class="hed-blc">Testing/Calibrition</td>
                <td>&nbsp;</td>
                <td><input name="testCalbr" type="text" class="textfield" id="testCalbr" /></td>
                <td ></td>
                <td align="right"><span class="hed-blc">Test Equipment:</span></td>
                <td>&nbsp;</td>
                <td><input name="testEquip" type="text" class="textfield" id="testEquip" /></td>
               
              </tr>
               <tr>
                <td height="10" align="right" bgcolor="#ffffff" class="hed-blc"></td>
                <td></td>
                <td ></td>
                <td ></td>
                <td width="19%"></td>
                <td width="1%"></td>
                <td width="34%"></td>
                </tr>
              <tr>
                <td height="21" align="right" bgcolor="#ffffff"  class="hed-blc">Others</td>
                <td>&nbsp;</td>
                <td><input name="others" type="text" class="textfield" id="others" /></td>
                <td ></td>
                <td width="19%"></td>
                <td width="1%"></td>
                <td width="34%"></td>
              </tr>
              
                    
                    </table>
                </td>
              </tr>
                </table>
                </td>
              </tr>
              <tr>
              	<td>
                	<table width="100%" border="0" cellspacing="0" cellpadding="0">
                   
                <tr>
                <td width="20%" height="10" align="right" bgcolor="#ffffff" class="hed-blc"></td>
               
                </tr>
                <tr>
                <td width="20%" height="10" align="right" bgcolor="#ffffff" class="hed-blc"></td>
               
                </tr>
				<tr>
                <td height="20"  align="left"  class="icon-header2">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
              		<tr>
                <td height="18" colspan="3"  align="left" valign="middle"  class="hed2" style="background:url(<%=application.getContextPath() %>/images/arrow-big.jpg); background-repeat:no-repeat">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Customer Product Profile</td>
               
               
              </tr>
              
                   
                <tr>
                <td width="20%" height="10" align="right" bgcolor="#ffffff" class="hed-blc"></td>
                <td width="1%"></td>
                <td width="24%" ></td>
                <td ></td>
                <td width="19%"></td>
                <td width="1%"></td>
                <td width="34%"></td>
                </tr>
              
              <tr>
                <td height="10" align="right" bgcolor="#ffffff" class="hed-blc"></td>
                <td></td>
                <td ></td>
                <td ></td>
                <td width="19%"></td>
                <td width="1%"></td>
                <td width="34%"></td>
                </tr>
                <tr>
                <td align="right"><span class="hed-blc">Customer End Product Details</span></td>
                <td>&nbsp;</td>
                <td><textarea name="custEndProd" class="textarea1"  id="custEndProd" ></textarea></td>
                <td ></td>
                 <td align="right" ><span class="hed-blc">Competitor Info</span></td>
                <td>&nbsp;</td>
                <td><textarea name="comptInfo" class="textarea1"  id="comptInfo" ></textarea></td>
                
               
              </tr>
              
              <tr>
                <td height="10" align="right" class="hed-blc" ></td>
                <td></td>
                <td ></td>
                <td ></td>
                <td width="19%"></td>
                <td width="1%"></td>
                <td width="34%"></td>
              </tr>
                           
                    
                    </table>
                </td>
              </tr>
                </table>
                </td>
              </tr>
              <tr>
                <td height="10">&nbsp; </td>
                
              </tr>
              <tr>
                <td height="10">
                <table width="906">
                <tr>
                <td width="76%"></td>
                <td width="9%"><input type="submit" class="button-black-right" value="Submit" tabindex="7"/></td>
                <td width="9%"><input type="reset" class="button-black" value="Clear" tabindex="8"/></td>
               
                <td width="3%">&nbsp;
                <input type="hidden" name="rCount" id="rCount" value="1"/>
                <input type="hidden" id="orglist" value="<%=request.getAttribute("orglist")%>"/>
                </td>
                <td width="3%" >&nbsp;&nbsp;                   </td>
                </tr>
                </table></td>
                
              </tr>
            </table></td>
          </tr>
        </table></td>
        </tr>
        <tr>
        <td>&nbsp; </td>
        </tr>
        <tr>
        <td>&nbsp; </td>
        </tr>
        <tr>
        <td>&nbsp; </td>
        </tr>
        <tr>
    <td height="40" align="left" valign="top" bgcolor="#0B0B0B">&nbsp;</td>
  </tr>
    </table></form>
</body>
</html>